package cn.gcyl.module.biz.dal.mysql.meetingplan;

import cn.gcyl.framework.common.pojo.PageResult;
import cn.gcyl.framework.mybatis.core.mapper.BaseMapperX;
import cn.gcyl.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.gcyl.module.biz.controller.admin.meetingplan.vo.*;
import cn.gcyl.module.biz.dal.dataobject.meetingplan.MeetingPlanDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 参会方案 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface MeetingPlanMapper extends BaseMapperX<MeetingPlanDO> {

    default PageResult<MeetingPlanDO> selectPage(MeetingPlanPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MeetingPlanDO>()
                .likeIfPresent(MeetingPlanDO::getSchemeName, reqVO.getSchemeName())
                .eqIfPresent(MeetingPlanDO::getSchemePrice, reqVO.getSchemePrice())
                .betweenIfPresent(MeetingPlanDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(MeetingPlanDO::getId));
    }

}